#include "vert_index.hpp"
#include "edge_list.hpp"
#include <iostream>

/*
 * Write by Jian He at 27/11/2013
 * This program implements pagerank using power-method .
 * As we all know, for a given N * N Sparse_Matrix A and an N-dimensional eigenvector B, the power method produces
 * a series of estimates for LAMBDA, the largest eigenvalue, and eigenvector B, the eigenvector B corresponding to LAMBDA
 * The iteration of power method repeats the following steps:
 *  A_B = A * B
 *  LAMBDA = || A_B ||
 *  B = A_B / LAMBDA
 *  when estimating the value of LAMBDA, we use the Rayleigh quotient,LAMBDA = ( B' * A * B ) / ( B' * B )
 *
 * Edge_list and vertex_list are now in the virtual memory.
 * We can easily get the min_vertex_id, max_vertex_id and num_edges, Thus,
 * the Dominant Eigenvectors can be set vector<max_vertex_id + 1> (1,1,1....1)
 * In order to save mem-space, I will not store the whole matrix to the memory!
 * In the contray, I will only read one vertex a time and the function is bellow..
 * while (--iter> 0)
 *      do_something
 *      for (all_the_vertex)
 *          read a vertex 
 *          then read all its edge and Standardization
 *          tmp_sum += tmp_sum + X * Y
 *          store the tmp_sum to the vector
 */

extern unsigned int min_vertex_id, max_vertex_id;
extern unsigned long long num_edges;
extern unsigned int vert_gap;


